Rework sliding algorithm. - No more weird jumping when items are dragged
authorSoeren Sandmann <sandmann@daimi.au.dk>
Mon, 24 Nov 2003 01:01:43 +0000 (01:01 +0000)
committerSøren Sandmann Pedersen <ssp@src.gnome.org>
Mon, 24 Nov 2003 01:01:43 +0000 (01:01 +0000)
commit2e98304e9b57acde7c833a35fad50aee7a92ea42
tree6adafa5c6748996590ee261c6c09bfbe649596d9
parentd17dc738e2bbc13f8fd86eb8a1e4b8945f32d976
Rework sliding algorithm. - No more weird jumping when items are dragged

Mon Nov 24 01:47:10 2003  Soeren Sandmann  <sandmann@daimi.au.dk>

Rework sliding algorithm.
- No more weird jumping when items are dragged off and added to
the toolbar,
- More natural item movement

* gtk/gtktoolbar.c (gtk_toolbar_size_allocate): Many changes. This
function is now responsible for calculating intermediate positions
during item sliding. It is also responsible for starting sliding
if items disappear.  Also turn off expanding when there is an
overflow menu.
(gtk_toolbar_begin_sliding, stop_sliding): New functions.
(slide_idle_handler): New function. All the sliding is now done by
gtk_toolbar_size_allocate(), so the idle handler now just checks
if there is more sliding to be done.
(compute_intermediate_allocation, position): new functions
calculating intermediate steps in the slide animations. The new
animation algorithm uses a constant speed instead of a constant
must-be-finished-within time.
(struct _ToolbarContent): use
GtkAllocation goal_allocation; and
GtkAllocation start_allocation; instead of
gint start/goal_width;

* gtk/gtktoolitem.c (gtk_tool_item_set_tooltip): fix typo in
documentation
ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtktoolbar.c
gtk/gtktoolitem.c